<!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8">
    <title>工作任务</title>
    <meta name="viewport"
        content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <link rel="stylesheet" type="text/css" href="../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../css/aui.css" />
    <link rel="stylesheet" type="text/css" href="../css/aui-pull-refresh.css" />
    <link rel="stylesheet" type="text/css" href="../css/iconfont.css" />
    <link rel="stylesheet" type="text/css" href="./css/headersearch.css" />
    <link rel="stylesheet" type="text/css" href="css/comm.css" />
    <link rel="stylesheet" type="text/css" href="../script/mui/mui.picker.min.css" />
    <link rel="stylesheet" type="text/css" href="../script/mui/mui.reset.css" />
    <link rel="stylesheet" type="text/css" href="css/customerservicelist.css" />
    <link rel="stylesheet" type="text/css" href="../script/vant/index.css" />
    <link rel="stylesheet" type="text/css" href="css/tasklist.css" />
    <style>    
        .newsearchparamitemlabel{
            line-height: 20px !important;
            padding: 0 10px !important;
            margin: 0 0.5rem 0.5rem 0 !important;
            font-size: 0.5rem !important; 
        }
        .work_con_box_left{
            width: 3.5rem;
        }
        .work_con_box_right{
            width: calc(100% - 3.5rem);
        }
    </style>
</head>

<body>
    <div id="app" v-cloak>
        <div class="add_box" v-on:click="addWorkTask()">
            <i class="icon iconfont icon-jia"></i>
        </div>
        <!-- 弹框黑色背景 -->
        <div v-on:click="doHideSearch()" v-if="show" class="maskbg">
        </div>
        <van-popup v-model="show" :overlay="false" position="top">
            <div class="search_area searchparam" style="height: 60%;">
                <div class="part searchcontent" style="height: 90%;">
                    <div class="searchparamtitle">
                        任务类型
                    </div>
                    <div class="searchparamitem">
                        <label v-on:click="doSelectType(item.ID)"
                            v-bind:class="{'active':form.TaskTypeIDs.indexOf(item.ID)>-1}"
                            v-for="item in TaskTypeList">{{item.Name}}</label>
                    </div> 
                    <div class="searchparamtitle">
                        任务标签
                    </div>
                    <div class="searchparamitem">
                        <label v-on:click="doSelectTag(item.ID)"
                            v-bind:class="{'active':form.TaskTagIDs.indexOf(item.ID)>-1}"
                            v-for="item in TaskTagList">{{item.Name}}</label>
                    </div> 
                    <div class="searchparamtitle">
                        任务开始时间
                    </div>
                    <div class="searchparamitem">
                        <div class="searchparamitem aui-padded-b-0">
                            <label v-bind:class="{'active':form.activeDate==1}" v-on:click="doClickDay(1)">近三天</label>
                            <label v-bind:class="{'active':form.activeDate==2}" v-on:click="doClickDay(2)">近七天</label>
                            <label v-bind:class="{'active':form.activeDate==3}" v-on:click="doClickDay(3)">近三十天</label>
                        </div>
                        <div class="searchparamitem searchparamitem_input">
                            <i class="icon iconfont icon-rili"></i>
                            <span class="choose new-span-date" id="startdate" data-options='{"type":"date"}'
                                v-bind:class="{'textColorPlaceholder':form.startTime==''}">{{form.startTime==''?'开始日期':form.startTime}}</span>
                            <span style="padding: 0 10px;">
                                至
                            </span>
                            <span class="choose new-span-date" id="enddate" data-options='{"type":"date"}'
                                v-bind:class="{'textColorPlaceholder':form.endTime==''}">{{form.endTime==''?'结束日期':form.endTime}}</span>
                        </div>
                    </div> 
                    <div class="searchparamtitle">
                        任务结束时间
                    </div>
                    <div class="searchparamitem">
                        <div class="searchparamitem aui-padded-b-0">
                            <label v-bind:class="{'active':form.activeDateLast==1}" v-on:click="doClickDayLast(1)">近三天</label>
                            <label v-bind:class="{'active':form.activeDateLast==2}" v-on:click="doClickDayLast(2)">近七天</label>
                            <label v-bind:class="{'active':form.activeDateLast==3}" v-on:click="doClickDayLast(3)">近三十天</label>
                        </div>
                        <div class="searchparamitem searchparamitem_input">
                            <i class="icon iconfont icon-rili"></i>
                            <span class="choose new-span-date" id="startdateLast" data-options='{"type":"date"}'
                                v-bind:class="{'textColorPlaceholder':form.startTimeLast==''}">{{form.startTimeLast==''?'开始日期':form.startTimeLast}}</span>
                            <span style="padding: 0 10px;">
                                至
                            </span>
                            <span class="choose new-span-date" id="enddateLast" data-options='{"type":"date"}'
                                v-bind:class="{'textColorPlaceholder':form.endTimeLast==''}">{{form.endTimeLast==''?'结束日期':form.endTimeLast}}</span>
                        </div>
                    </div> 
                    <div class="aui_bottom">
                        <div v-on:click="doReset(1)" class="aui_bottombtn left">重置</div>
                        <div v-on:click="do_search()" class="aui_bottombtn right">确认</div>
                    </div>
                </div>
            </div>
        </van-popup>
        <header class="topheader" id="aui-header">
            <div class="topheader_search">
                <div class="aui-searchbar new-aui-searchbar" id="search">
                    <div class="aui-searchbar-input aui-searchbar-input-white aui-border-radius">
                        <i class="icon iconfont icon-sousuo"></i>
                        <input v-model="form.keywords" type="search" placeholder="任务标题" id="search-input">
                        <div class="aui-searchbar-clear-btn" style="top:12px">
                            <i class="icon iconfont icon-guanbi"></i>
                        </div>
                    </div>
                    <div class="aui-searchbar-btn" tapmode></div>
                </div>
                <div v-on:click="do_open_search()" class="selecticon">筛选</div>
            </div>
            <div class="aui_tab_box" style="float: right;background-color: #fff;">
                <!-- 1 暂存  2 进行中  3 已完成-->
                <div class="aui-tab aui-tab-color">
                    <div v-on:click="select_status(2)" class="aui-tab-item menu_tapmode" style="width: 100%;text-align: left;margin-left: 3px;"
                        v-bind:class="{'aui-active':form.status==2}">
                        <label class="labelbox">
                            进行中
                            <span v-if="total.HandleCount>0" class="menu_dotspan">{{total.HandleCount}}</span>
                        </label>
                    </div>
                    <div v-on:click="select_status(3)" class="aui-tab-item menu_tapmode" style="width: 100%;"
                        v-bind:class="{'aui-active':form.status==3}">
                        <label class="labelbox">
                            已完成
                            <!-- <span v-if="total.CompleteCount>0" class="menu_dotspan">{{total.CompleteCount}}</span> -->
                        </label>
                    </div>
                    <div v-on:click="select_status(1)" class="aui-tab-item menu_tapmode" style="width: 100%;text-align:right;"
                        v-bind:class="{'aui-active':form.status==1}">
                        <label class="labelbox">
                            暂存
                            <!-- <span v-if="total.WaitSendCount>0" class="menu_dotspan">{{total.WaitSendCount}}</span> -->
                        </label>
                    </div>
                    <div class="cl">
                    </div>
                </div>
                <div class="searchparamitem aui-padded-b-0" style="padding-left: 0.9rem;margin-top: -0.2rem;">
                    <label v-if="form.status==1&&index==0"  v-on:click="doSelectSearchStatus(item.ID)"
                    v-bind:class="{'active':form.TaskSearchStatus==item.ID}"  class="newsearchparamitemlabel"
                    v-for="(item,index) in TaskSearchList">{{item.Name}}</label>
                    <label v-if="form.status!=1" v-on:click="doSelectSearchStatus(item.ID)"
                        v-bind:class="{'active':form.TaskSearchStatus==item.ID}"  class="newsearchparamitemlabel"
                        v-for="item in TaskSearchList">{{item.Name}}</label>
                </div> 
            </div>
        </header>
        <section id="main_refresh" class="aui-refresh-content" style="margin-top: 6rem;">
            <div class="aui-content task" v-if="list.length>0">
                <div v-for="item in list" class=" boxarea mainbox aui-padded-b-15">
                    <div v-on:click="open_list(item)" class="work_con_box aui-padded-b-10">
                        <div class="workheader aui-margin-b-15">
                            <div class="work_title_add ellipsis_one fl" style="font-weight: bold;width: 60%;">
                                {{item.Title}}</div>
                            <div  class="typestatus dsl ellipsis_one" style="width: 60px;" >{{item.TypeName}}</div>
                        </div>
                        <div class="work_con_box_time marginheight">
                            <div class="work_con_box_left">任务周期：</div>
                            <div class="work_con_box_right">
                                <label>{{item.StartTimeDesc}}~{{item.EndTimeDesc}}<span v-if="item.IsTimeOut" class="overtime">{{item.TimeOutDesc}}</span></label>
                            </div>
                        </div>
                        <div class="work_con_box_time marginheight">
                            <div class="work_con_box_left">负责人：</div>
                            <div class="work_con_box_right">
                                <label>{{item.HandleUserName}}</label>
                            </div>
                        </div>
                        <div class="work_con_box_time marginheight">
                            <div class="work_con_box_left">创建人：</div>
                            <div class="work_con_box_right">
                                <label>{{item.AddUserName}}</label>
                            </div>
                        </div>
                        
                    </div>
                    <div class="new_work_typebox">
                        <div>
                            <label  v-bind:class="{'text-blue':form.status==2}">{{item.StatusDesc}}</span>
                        </div>
                        <div>
                            <label v-on:click="open_list(item)" class="work_beginbtn new_work_btn" >查看</label>
                        </div>
                    </div>
                </div>
                <div class="notodayList" v-if="!can_scroll">
                    别刷了，真的没有啦...
                </div>
            </div>
            <div class="noinfo" id="noorder" v-if="list.length==0&&!is_searching">
                <img src="../image/index/noinfomsg_icon.png" alt="" />
                <h5><br />暂无相关信息</h5>
            </div>
        </section>
    </div>
</body>
<script type="text/javascript " src="../script/api.js"></script>
<script type="text/javascript " src="../script/vue.js"></script>
<script type="text/javascript" src="../script/config.js"></script>
<script type="text/javascript" src="../script/common.js"></script>
<script type="text/javascript" src="../script/mui/mui.min.js"></script>
<script type="text/javascript" src="../script/mui/mui.picker.min.js"></script>
<script type="text/javascript" src="../script/mui/mui.poppicker.js"></script>
<script type="text/javascript" src="../script/page/dateRangeUtil.js"></script>
<script type="text/javascript" src="../script/aui-toast.js"></script>
<script type="text/javascript" src="../script/aui-dialog.js"></script>
<script type="text/javascript" src="../script/aui-tab.js"></script>
<script type="text/javascript" src="../script/aui-pull-refresh.js"></script>
<script type="text/javascript" src="../script/aui-scroll.js"></script>
<script type="text/javascript" src="../script/aui-popup.js"></script>
<script type="text/javascript " src="../script/vant/vue.js"></script>
<script type="text/javascript " src="../script/vant/vant.js"></script>
<script type="text/javascript " src="../script/moment/moment.js"></script>
<script type="text/javascript " src="js/worktasklist.js"></script>

</html>